const ol = require("ol3");
const Tile = require("../Tile");
const React = require("react");

const InitPage = React.createClass({

    componentDidMount(){
        var map = new ol.Map({
            target: 'map',
            layers: [
                new ol.layer.Tile({
                    source: new ol.source.OSM()
                })
            ],
            view: new ol.View({
                center: ol.proj.fromLonLat([116,41]),
                zoom: 4
            })
        });
    },

    render(){
        return (
            <div className="container">
                <Tile header="初始化">
                    <div id="map">

                    </div>
                </Tile>
            </div>
        );
    }
});

module.exports = InitPage;